﻿using System;
using System.Collections.Generic;

using System.Text;
using System.Windows;
using Bixas.Tangibilis.Input;

namespace Bixas.Tangibilis
{
    public class TouchApplication : Application, IDisposable
    {
        private static TouchSource manager = TouchSource.getInstance();

      
        ~TouchApplication()
        {
            this.Dispose();
        }

        protected override void OnExit(ExitEventArgs e)
        {
            base.OnExit(e);
            this.Dispose();
        }

        #region IDisposable Members

        public void Dispose()
        {
            this.Dispose(true);
            GC.SuppressFinalize(this);
        }

        private void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (manager != null)
                {
                    manager.Dispose();
                }
            }
        }
        #endregion
    }
}
